<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Abstract
 *
 * @author miho
 */
abstract class BluesCoders_View_Helper_Abstract {

    protected $_canonicalName;

    public function  __construct() {
        BluesCoders_Event_Dispatcher::getIsntance()
            ->addEventListener(
                BluesCoders_View_Helper_Event::CALL,
                new BluesCoders_Event_Listener(
                    $this,
                    'onHelper'
                )
            );
    }

    public function onHelper(BluesCoders_View_Helper_Event $event) {
        if($event->getHelperName() == $this->_canonicalName) {
            $event->setResult(call_user_func_array(array($this,'doHelper'), $event->getArguments()));
        }
    }

}
?>
